/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef ROBOT_MATH_H
#define ROBOT_MATH_H

#ifdef __cplusplus
extern "C" {
#endif
/*
 *
 *  Library for commonly used robotics functions.
 *  Author: Marek Matusiak
 */



/*
 *  calculates max circle radius for a differential drive robot
 *  at a desired translational velocity and wheel speed limitation
 *  input translational velocity v, max wheel speed, robot distance betwee wheels.
 */
float CircleRadiusFromVelocities(float v, float wheel_speed_limit, float axle_width);

/*
 *
 *  Two functions for normalization of heading
 *
 */
float NormalizeAngleDegrees(float heading);
float NormalizeAngleRadians(float heading);

float GetAngleBetweenVectors(float v1_mag, float v1_ang, float v2_mag, float v2_ang);


/*
 *
 *  Got an angle between -180 and 180 degrees and need to convert it to run
 *  from 0 to 360? No worries, just use the func. below.
 *
 */

float ConvertMinus180Plus180ToZero360 (float angle);

}
#endif

